import { View } from "react-native"
import { useTableReducer } from "../../hooks"
import { postRankingsList } from "../../services"
import { forwardRef, useCallback, useEffect, useImperativeHandle } from "react"
import { Empty, ImgText3 } from "../../components"

interface RankChildrenProps {
    navigation: any
    data: any[]
}
const RankChildren = forwardRef((props: RankChildrenProps, ref?: any) => {
    const { navigation, data } = props
    
    return (
        <View style={{ flex: 1 }}>
            {Array.isArray(data) && data.length > 0 ? data.map((it, i) => (<ImgText3 key={it.Id || i} {...it} idx={i} navigation={navigation} />)) : <Empty />}
        </View>
    )
})

export default RankChildren
